﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Document_Management.tianche;
namespace Document_Management
{
    public partial class frm天車人員 : Form
    {
        
        TextBox tx;
        public frm天車人員(TextBox tx)
        {
            InitializeComponent();
            this.tx = tx;
        }
   
        private void 天車人員_Load(object sender, EventArgs e)
        {
            PublicClass.LoadAllNoneProcedure("天車人員", _dtgv天車人員List);
        }

      
      
        private void btn_OK天車人員_Click(object sender, EventArgs e)
        {
            try
            {
                int r = _dtgv天車人員List.CurrentCell.RowIndex;
                string id = _dtgv天車人員List.Rows[r].Cells[0].Value.ToString();
                tx.Text = id;
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void _dtgv天車人員List_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            PublicClass.setRowNumber(_dtgv天車人員List);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            PublicClass.SearchTiancherenyuan(_dtgv天車人員List, _txt天車人員代號.Text, _txt人員姓名.Text, _txt部門名稱.Text, _txt成本中心名稱.Text, _txt電話號碼.Text);
        }
    }
}

